#!/bin/bash
# Increment $pkgrel for a package.

# /scripts/
cd "$(dirname "$0")"

if [[ $# == 0 ]] ; then
	echo >&2 'no arguments.'
	exit 1
fi

pack=$1

cd ../packages/$1

. ./PKGBUILD

echo "incrementing from $pkgrel to $(( pkgrel + 1 ))..."

sed -i "s/^pkgrel=.*/pkgrel=$(( pkgrel + 1 ))/" PKGBUILD
